class LogConfig {
    public static logEnabled: boolean = false
    public static viewNodeInfo: boolean = false

    static init(logEnabled: boolean = false, viewNodeInfo: boolean = false) {
        this.logEnabled = logEnabled
        this.viewNodeInfo = viewNodeInfo
    }
}

function loggerNode(...args: any[]) {
    try {
        if (LogConfig.viewNodeInfo) logger(...args)
    } catch (e) {

    }
}


function logger(...args: any[]) {
    if (LogConfig.logEnabled) console.log('HLRouter-> ', ...args)
}


function loggerE(...args: any[]) {
    if (LogConfig.logEnabled) console.error('HLRouter err-> ', ...args)
}

export {logger, loggerE, loggerNode, LogConfig}